package com.bao.work;

import java.util.Scanner;

/**
 * @author baoye
 * @date 2024-07-24/18:50
 */
public class StringClass07 {
    public static void main(String[] args) {
        String password=new Scanner(System.in).next();
        if(password.length()<9){
            System.out.println("密码长度过低");
            return;
        }
        int countBig=0;
        int countNum=0;
        for (int i = 0; i < password.length(); i++) {
            char t=password.charAt(i);
            if(t>='A'&&t<='Z'){
                countBig++;
            }
            if(t>='0'&&t<='9'){
                countNum++;
            }
        }
        if(countBig<2||countNum==0){
            System.out.println("密码不合法");
            return;
        }
        System.out.println("密码合法");

    }
}
